C (5/301)

From:Gabriele Svelto
Date:01 Aug 99 at 18:11:32
Subject:Re: (no subject)

From: Gabriele Svelto <jlpicard@tiscalinet.it>

Hello Andrew

On 01-Ago-99, you wrote:

> From: Andrew Markwell <andrewmarkwell@ukonline.co.uk>
>
> On 01-Aug-99 did write:
>> From: Allan Odgaard <Duff@DIKU.DK>
>>
>> On 08-Jul-99, David Arbuthnot wrote:
>>
>>> Unfortunatley my machine is seriousley outdated (A1200, 020, 6mb) which
>>> means that I can't use enforcer or mungwall as they require an MMU (I
>>> think) so can anybody suggest an enforcer like tool for checking memory
>>> etc.. that does not require an MMU ?.
>>
>> Enforcer is the only debug-tool that I know of which require an MMU. You
>> can still use Poolwatch, Mungwall, Segtracker, PatchWork, Sushi etc...
>> (I'm sure there's a dozen more on aminet :-) )
>
> Forget debugging tools... be a man and print it out, and go through it
> with a pen and a few spare hours ;)
>
> Andrew Markwell

Real programmers (TM) don't use debuggers! A little trick, if the proggie
crashes before you could read the printf()s you can use fprintf() to write
to a file stocked in a recoverable Ram Drive (such as RAD:). It's better
than saving the file on your HD 'cos it won't be closed if the program
crashes and you'll have to revalidate your partition. Otherwise you could
use some code like that every time you call fprintf():

file = fopen("debug_file.txt", "w");
fprintf(file, /* put here what you want to print just like in printf() */ );
(void) fclose(file);

this could be really slow (especially if you call fprintf() tons of times in
a loop or something like that) but you can be sure you won't have problems
if your machine crashes.

Gabriele Svelto